package business;


import java.util.Vector;

public class Util {

    public static String[] split(String p_String, String p_Separator) {
        Vector v_Nodes = new Vector();
        int c_Index = p_String.indexOf(p_Separator);
        while (c_Index >= 0) {
            v_Nodes.addElement(p_String.substring(0, c_Index));
            p_String = p_String.substring(c_Index + p_Separator.length());
            c_Index = p_String.indexOf(p_Separator);
        }
        v_Nodes.addElement(p_String);

        String[] v_Result = new String[v_Nodes.size()];
        if (v_Nodes.size() > 0) {
            for (int c_Position = 0; c_Position < v_Nodes.size(); c_Position++) {
                v_Result[c_Position] = (String) v_Nodes.elementAt(c_Position);
            }

        }

        return v_Result;
    }
}
